//
//  DirectionalStealthVC.m
//  SelfDriving
//
//  Created by apple on 16/1/19.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "DirectionalStealthVC.h"
#import "BusinessService+WD.h"
@interface DirectionalStealthVC ()
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UITextField *IDField;

@end

@implementation DirectionalStealthVC

- (void)viewDidLoad {
    [super viewDidLoad];
    _contentLabel.layer.cornerRadius = 3;
     _contentLabel.clipsToBounds = YES;
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}
#pragma  mark 添加
- (IBAction)addAction:(UIButton *)sender {
    if([_IDField.text trim].length == 0 ){
        [SVProgressHUD showErrorWithStatus:@"请输入对方的ID"];
        return;
    }
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
    [dic setObject:_IDField.text forKey:@"fid"];
    [dic setObject:@"1" forKey:@"type"];
    [[BusinessService shareInstance]yinshen:dic success:^(id result) {
        [SVProgressHUD showSuccessWithStatus:@"设置成功"];
    }failure:^(id result) {
        [SVProgressHUD showErrorWithStatus:result];
    }];
    
    
}
- (IBAction)backActino:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
